#include<mjl.h>
void play_anim()
{
	char* hero = mjl_getMainHero();
	mjl_setPos(hero, "hu_die");
	char* hu_die_1 = "tex/game/hu_die/1.png";
	char* hu_die_2 = "tex/game/hu_die/2.png";
	char* tex = "tex";
	float t = 0.01f;
	mjl_showTex(hu_die_1, tex, "hd_0", 100);
	mjl_wait(0.3f);
	mjl_destroy(tex);
	mjl_showTex(hu_die_2, tex, "hd_1", 100);
	mjl_wait(0.3f);
	mjl_turn(hero, TURN_LEFT);
	mjl_say(hero, "小蝴蝶，不要跑...");
	mjl_destroy(tex);
	mjl_showTex(hu_die_1, tex, "hd_2", 100);
	mjl_wait(0.3f);
	mjl_destroy(tex);
	mjl_showTex(hu_die_2, tex, "hd_3", 100);
	mjl_wait(0.3f);
	mjl_destroy(tex);
	mjl_showTex(hu_die_1, tex, "hd_4", 100);
	mjl_wait(0.3f);
	mjl_turn(hero, TURN_BACK);
	mjl_say(hero, "小蝴蝶，不要跑啊...");
	mjl_destroy(tex);
	mjl_showTex(hu_die_2, tex, "hd_5", 100);
	mjl_wait(0.3f);
	mjl_destroy(tex);
	mjl_showTex(hu_die_1, tex, "hd_6", 100);
	mjl_wait(0.3f);
	mjl_destroy(tex);
	mjl_showTex(hu_die_2, tex, "hd_7", 100);
	mjl_wait(0.3f);
	mjl_destroy(tex);
	mjl_turn(hero, TURN_RIGHT);
	mjl_say(hero, "小蝴蝶，快出来!");
	mjl_turn(hero, TURN_FRONT);
	mjl_say(hero, "小蝴蝶......哪里去了？？");
	mjl_turn(hero, TURN_LEFT);
	char* npc = "npc";
	mjl_loadNpc("you_ren_2", npc, false, "");
	mjl_setPos(npc, "npc_0");
	mjl_turn(npc, TURN_LEFT);
	mjl_wait(0.2f);
	mjl_moveBy(npc, -6, 0);
	mjl_wait(0.2f);
	mjl_turn(npc, TURN_BACK);
	mjl_wait(0.2f);
	mjl_moveBy(npc, 0, 3);
	mjl_wait(0.2f);
	mjl_moveBy(npc, 0, 3);
	mjl_wait(0.2f);
	mjl_moveBy(npc, 0, 2);
	mjl_wait(0.2f);
	mjl_turn(npc, TURN_RIGHT);
	mjl_wait(0.2f);
	mjl_moveBy(npc, 1, 0);
	mjl_wait(0.2f);

	mjl_say("", "师兄，原来你在这啊，师傅找不到你，正在无机阁大发雷霆呢，你快点到无机阁见师父吧。");
	mjl_say(hero, "好，你先走，我就去。");
	mjl_turn(npc, TURN_LEFT);
	mjl_wait(0.2f);
	mjl_moveBy(npc, -1, 0);
	mjl_wait(0.2f);
	mjl_turn(npc, TURN_FRONT);
	mjl_wait(0.2f);
	mjl_moveBy(npc, 0, -2);
	mjl_wait(0.2f);
	mjl_moveBy(npc, 0, -3);
	mjl_wait(0.2f);
	mjl_moveBy(npc, 0, -3);
	mjl_wait(0.2f);
	mjl_turn(npc, TURN_RIGHT);
	mjl_wait(0.2f);
	mjl_moveBy(npc, 6, 0);
	mjl_wait(0.2f);
	mjl_destroy(npc);
	
	mjl_say(hero, "咦？我的小蝴蝶哪里去了？？");
	mjl_msgMap(1.2f);
}
void main()
{
	play_anim();
}